<%@page trimDirectiveWhitespaces="true"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- Errors -->
<!-- Loading screen -->
<div id="loadingScreen"></div>
<!-- Register form -->
<div id="user_datas">
 <c:if test="${not empty captchaError}">
  <div id="captchaError" class="formError">
   <spring:message code="error.captcha.invalid" />
  </div>
 </c:if>
 <div id="errorData" class="formCachedError">
  <spring:message code="error.field.error.begin" />
  "<span id="fieldName"></span>"
  <spring:message code="error.field.error.end" />
 </div>
 <div id="fieldError" class="formCachedError"></div>
 <div id="errorPasswordMatch" class="formCachedError">
  <spring:message code="error.password.match" />
 </div>
 <div id="errorPasswordTooShort" class="formCachedError">
  <spring:message code="error.password.too.short" />
 </div>
 <div id="errorMailRegex" class="formCachedError">
  <spring:message code="error.mail.regex" />
 </div>
 <div id="errorAddressUnknown" class="formCachedError">
  <spring:message code="error.address.unknown" />
 </div>
 <div id="errorList" class="formError">
  <c:forEach items="${errorList}" var="error">
   <spring:message code="${error}" />
   <br />
  </c:forEach>
 </div>
 <form:form method="post" action="../add/patient" commandName="register" class="withAddress">
  <!-- 1st line -->
  <tags:columnInputText label="label.login" id="username" mandatory="true" />
  <tags:columnInputText label="label.mail" id="mail" mandatory="true" />
  <!-- 2nd line -->
  <tags:columnInputPassword label="label.password" id="password" mandatory="true" />
  <tags:columnInputPassword label="label.password.confirm" id="passwordConfirm" mandatory="true" />
  <!-- 3rd line -->
  <tags:columnInputRadio label="label.gender" id="gender" items="${genderList}" mandatory="true" />
  <div class="formColumn">&nbsp;</div>
  <!-- 4th line -->
  <tags:columnInputText label="label.firstname" id="firstname" mandatory="true" />
  <tags:columnInputText label="label.lastname" id="lastname" mandatory="true" />
  <!-- 5th line -->
  <tags:columnInputText label="label.postal.address" id="postalAddress" big="true" mandatory="true" />
  <!-- 6th line -->
  <tags:columnInputText label="label.postal.code" id="postalCode" mandatory="true" />
  <tags:columnInputText label="label.city" id="city" mandatory="true" />
  <!-- 7th line -->
  <tags:columnInputText label="label.phone" id="businessPhone" mandatory="true" />
  <tags:columnInputText label="label.gsm.phone" id="gsmPhone" />
  <!-- Last line before -->
  <c:if test="${recaptchaEnabled}">
   <tags:reCaptcha />
  </c:if>
  <form:hidden path="lat" />
  <form:hidden path="lng" />
  <div class="formBigColumn">
   <spring:message code="label.create.account" var="submit" />
   <input type="button" name="register_button" value="${submit}" id="register_button" />
  </div>
  <div class="clear"></div>
 </form:form>

</div>